package com.ihr360.payroll.dao;

import com.ihr360.payroll.model.dto.reference.ReferenceService;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;

import java.util.List;
import java.util.Set;

public interface ReferenceServiceRepository extends CrudRepository<ReferenceService, Long> {

    List<ReferenceService> findByRefIdIn(Set<String> serviceRefIds);

    @Query(value = "select r from ReferenceService r where refApplication.refId in :refApplicationIds ")
    List<ReferenceService> findByRefIdIn(@Param("refApplicationIds") List<String> refApplicationIds);

}